//写 Schema Model操作

var mongoose = require('mongoose');
var {Schema,model} = mongoose;

var user_schema = new Schema({
    username:String,
    password:String,
    mobile:String,
    confirm_password:String,
    age:Number,
    word:String,
    time:Date
})

exports.UserModel = model('users',user_schema)

//房间信息
var room_schema = new Schema({
    "rnum": String,
    "type": String,
    "food": String,
    "moeny": String,
    "phone":String,
    "state": String,
    "alt": String,
    "id": String
})

exports.RoomModel = model('rooms',room_schema)

//员工信息
var staff_schema = new Schema({
    "name": String,
    "job": String,
    "address": String,
    "tel": String,
    "time":String,
    "alt": String,
    "id": String
})
exports.StaffModel = model('staffs',staff_schema)


//客户信息

var customer_schema = new Schema({
    "customer": String,
    "crd": String,
    "roomtype": String,
    "tel": String,
    "time":String,
    "alt": String,
    "id": String
})

exports.CustomerModel = model('customers',customer_schema)